var mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate');

var Schema = mongoose.Schema;

var ObjectId = Schema.ObjectId;

var CommitSchema = new Schema({
	name:String,
	content:String,
	date: { type: Date, default: Date.now },
	cateId: ObjectId
})

CommitSchema.plugin(mongoosePaginate);

module.exports = mongoose.model('Commit',CommitSchema,'commit');

// comment

//var mongoose = require('mongoose');
//var materializedPlugin = require('mongoose-materialized');
//var Schema = mongoose.Schema;
//
//var ObjectId = Schema.ObjectId;
//console.log(ObjectId)
//var CommitSchema = new Schema({
//	name:String,
//	content:String,
//	cateId: ObjectId
//})
//CommitSchema.plugin(materializedPlugin);
//module.exports = mongoose.model('Commit',CommitSchema,'commit');